package com.aliyun.messagemgt.dto.base;

import com.aliyun.messagemgt.common.enums.IsEnabledEnum;
import com.aliyun.messagemgt.common.validation.EnumValid;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @ClassName: BaseReceiveGroupUpdateCmd
 * @Description:
 * @Author: wugongzi
 * @Date: 2021/9/28 14:47
 * @Version: 1.0
 */
@Getter
@Setter
@ToString
@ApiModel("接收组更新Cmd")
public class BaseReceiveGroupUpdateCmd implements Serializable {

    private static final long serialVersionUID = -8862349600412899922L;

    @ApiModelProperty("接收组id")
    @NotNull(message = "接收组id为空")
    private Long id;

    @ApiModelProperty("租户编码")
    private String tenantCode;

    @ApiModelProperty("接收组编码")
    private String receiveGroupCode;

    @ApiModelProperty("接收组名称")
    private String receiveGroupName;

    @ApiModelProperty("描述")
    private String description;

    @ApiModelProperty(value = "是否启用 Y-启用 N-停用",allowableValues = "Y,N",example = "Y")
    @EnumValid(message = "isEnabled值无效",target = IsEnabledEnum.class)
    private String isEnabled;

    /**
     * 修改时间
     */
    @ApiModelProperty(hidden = true)
    private LocalDateTime gmtModified = LocalDateTime.now();

    @ApiModelProperty("接收组范围")
    @Valid
    private List<BaseReceiveGroupRangeAddCmd> baseReceiveGroupRangeAddCmdList;
}
